package com.aabte.permissionframeworklearn.permission.dto;

import com.aabte.permissionframeworklearn.permission.model.SysAcl;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.beans.BeanUtils;

/**
 * @author Daniel
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class AclDto extends SysAcl {

    /**
     * 权限是否默认选中
     */
    private Boolean checked = false;

    /**
     * 是否有权限操作
     */
    private Boolean hasAcl = false;

    public static AclDto adapt(SysAcl acl) {
        AclDto dto = new AclDto();
        BeanUtils.copyProperties(acl, dto);
        return dto;
    }

}
